package com.neusoft.liduan.d0916;

public class Student {
	private String name;
	
	public Student(String name) {
		this.name = name;
	}
	
	@Override
	public int hashCode() {
		return 11;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Student) {
			return name.equals(((Student)obj).name);//只要名称相同，则为同一个对象
		}
		return false;
	}
}
